import request from '@/utils/request'

// 查询项目信息列表
export function listProjectInfo(query) {
  return request({
    url: '/Project/ProjectInfo/list',
    method: 'get',
    params: query
  })
}

// 查询项目信息详细
export function getProjectInfo(id) {
  return request({
    url: '/Project/ProjectInfo/' + id,
    method: 'get'
  })
}

// 新增项目信息
export function addProjectInfo(data) {
  return request({
    url: '/Project/ProjectInfo',
    method: 'post',
    data: data
  })
}

// 修改项目信息
export function updateProjectInfo(data) {
  return request({
    url: '/Project/ProjectInfo',
    method: 'put',
    data: data
  })
}

// 删除项目信息
export function delProjectInfo(id) {
  return request({
    url: '/Project/ProjectInfo/' + id,
    method: 'delete'
  })
}
// 左边楼栋列表——楼栋列表
export function getFloorlist(projectNo) {
  return request({
    url: '/Project/ProjectInfo/getFloorlist/' + projectNo,
    method: 'get'
  })
}
// 右边表格楼栋table 表格
export function getFloorLayer(data) {
  return request({
    url: '/Project/ProjectInfo/getFloorLayer',
    method: 'post',
    data: data
  })
}
// 删除楼栋
export function delBuild(data) {
  return request({
    url: '/Project/ProjectInfo/delBuild',
    method: 'post',
    data: data
  })
}
// 编辑页的构件类型
export function getCompomentTypeList(){
  return request({
    url: '/Project/ProjectInfo/getCompomentTypeList/',
    method: 'get'
  })
}
// 编辑页的构件名称
export function getCompomentList(data) {
  return request({
    url: '/Project/ProjectInfo/getCompomentList',
    method: 'post',
    data: data
  })
}

// 复制楼栋
export function copyBuild(data) {
  return request({
    url: '/Project/ProjectInfo/copyBuild',
    method: 'post',
    data: data
  })
}

// 添加构件的确定按钮
export function addWidget(data) {
  return request({
    url: '/Project/ProjectInfo/addWidget',
    method: 'post',
    data: data
  })
}
// 复制楼层的弹框
export function copyLayer(data) {
  return request({
    url: '/Project/ProjectInfo/copyLayer',
    method: 'post',
    data: data
  })
}
// 删除楼层
export function delLayer(data) {
  return request({
    url: '/Project/ProjectInfo/delLayer',
    method: 'post',
    data: data
  })
}
// 下载模板
export function importTemplate(data) {
  return request({
    url: '/Project/ProjectInfo/importTemplate',
    method: 'post',
    data: data
  })
} 
// 导入Excel
export function importData(data) {
  return request({
    url: '/Project/ProjectInfo/importData',
    method: 'post',
    data: data
  })
}
// 合同下拉框
export function getContractInfoList() {
  return request({
    url: '/Project/ProjectInfo/getContractInfoList/',
    method: 'get'
  })
}
// 合同信息
export function getContractInfo(id) {
  return request({
    url: '/Project/ProjectInfo/getContractInfo/'+id,
    method: 'get'
  })
}

// 新建楼栋 是获取焦点 和失去焦点的时候调用的
export function createBuild(data) {
  return request({
    url: '/Project/ProjectInfo/createBuild',
    method: 'post',
    data: data
  })
}
// 项目构件导出
export function exportMember(data) {
  return request({
    url: '/Project/ProjectInfo/exportMember',
    method: 'post',
    data: data
  })
}